/**
 * 统一使用IView UI组件库（http://v3.iviewui.com/docs/guide/start）
 * 使用：
 *  1.使用什么组件就引入组件，减少打包文件大小
 */
import Vue from 'vue'
import {
	Time,
	Badge,
	BackTop,
	Avatar,
	Drawer,
	Input,
	Row,
	Col,
	Button,
	Progress,
	Tag,
	Icon,
	Affix,
	Rate,
	Modal,
	LoadingBar,
	Message,
	Notice
} from 'iview'
import 'iview/dist/styles/iview.css'

Vue.component('iv-time', Time)
Vue.component('iv-badge', Badge)
Vue.component('iv-back-top', BackTop)
Vue.component('iv-avatar', Avatar)
Vue.component('iv-drawer', Drawer)
Vue.component('iv-input', Input)
Vue.component('iv-row', Row)
Vue.component('iv-col', Col)
Vue.component('iv-button', Button)
Vue.component('iv-progress', Progress)
Vue.component('iv-tag', Tag)
Vue.component('iv-icon', Icon)
Vue.component('iv-affix', Affix)
Vue.component('iv-rate', Rate)

Message.config({
    duration: 3
});
Notice.config({
	top: 70,
	duration: 3
})
// 配置加载进度条
LoadingBar.config({
	color: '#5cb85c',
	failedColor: '#f0ad4e',
	height: 2
})

Vue.prototype.$Modal = Modal
Vue.prototype.$Message = Message
Vue.prototype.$Notice = Notice
Vue.prototype.$LoadingBar = LoadingBar